|
RAIS
3.2
|
00001 00028 using System; 00029 using System.Collections.Generic; 00030 using System.Text; 00031 using System.Data; 00032 00033 namespace RAIS.Common.UserManagement 00034 { 00038 public class Region : DBObject 00039 { 00040 #region Constructors 00041 public Region() 00042 { } 00043 public Region(IDataRecord record) 00044 { 00045 if (record["PK Region ID"] is DBNull) 00046 { 00047 this.ID = 0; 00048 this.Name = string.Empty; 00049 } 00050 else 00051 { 00052 this.ID = (int)record["PK Region ID"]; 00053 this.Name = record["Region Name"].ToString(); 00054 } 00055 } 00056 #endregion 00057 #region Public methods 00058 public bool RestricitonsConflict(Region region) 00059 { 00060 if (region.Name == RAIS.Common.Constants.ALL_REGIONS && 00061 this.Name != RAIS.Common.Constants.ALL_REGIONS) 00062 return true; 00063 else 00064 if (this.Name == RAIS.Common.Constants.ALL_REGIONS && 00065 region.Name != RAIS.Common.Constants.ALL_REGIONS) 00066 return true; 00067 else 00068 return false; 00069 } 00070 #endregion 00071 } 00072 }